{template '_header'}
<link rel="stylesheet" type="text/css" href="../addons/ewei_shopv2/template/mobile/default/static/css/coupon.css?v=2.0.0">
<div class='fui-page  fui-page-current coupon-my-page'>
	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back" onclick="window.history.go(-1);"></a>
		</div>
		<div class="title">我的优惠券</div>
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>

		<div class="coupon-headblock">
			<div class="top-layer"></div>
			<div class="line-layer"></div>
			<div class="bottom-layer"></div>
			<div class="gold"></div>
			<div class="link-text">请至【<a href="{php echo mobileUrl('sale/coupon/my')}">我的优惠券</a>】查看</div>
			<div class="paper">
				<div class="title">恭喜获得</div>
				<div class="text">
					<i class="d1"></i>
					<i class="d2"></i>
					<p class="t1"><span>{php echo count($coupons)}</span>张优惠券</p>
				</div>
				<i class="line"></i>
				<i class="dot-top"></i>
				<i class="dot-left"></i>
				<i class="dot-right"></i>
				<i class="dot-1"></i>
				<i class="dot-2"></i>
				<i class="dot-3"></i>
				<i class="dot-4"></i>
				<i class="dot-5"></i>
				<i class="dot-6"></i>
			</div>
		</div>

		<div id="container" class="coupon-container coupon-index-list">

			{loop $coupons  $coupon}
				{if empty($coupon['check'])}
					<a href="{php echo mobileUrl('sale/coupon/my/detail')}&id={$coupon['id']}" class="coupon-index-list-a  {$coupon['color']}">
				{else}
					<a href="javascript:void(0)" class="coupon-index-list-a {$coupon['color']}">
				{/if}
					<div class="fui-list coupon-list">
						<span class="coupon-ling"><img src="../addons/ewei_shopv2/template/mobile/default/static/images/coupon/{$coupon['imgname']}.png" alt=""></span>
						<div class="fui-list-inner coupon-index-list-left">
							<b   style="width: 92px ; text-align:center ;{if $coupon['settitlecolor'] ==1&&$coupon['check'] !=2 }background:{$coupon['titlecolor']}{/if}">{$coupon['tagtitle']}</b>
							<div class="coupon-index-list-info fui-list">
								<div class="fui-list-media">
									<img src="{if $coupon.thumb=='' }/addons/ewei_shopv2/template/mobile/default/static/images/coupon/coupon-list-img.png{else} {$coupon['thumb']}{/if}" alt="">
								</div>
								<div class="fui-list-inner">
									<h3>{$coupon['couponname']}</h3>
									<p class="coupon-full">{$coupon['title3']}  {$coupon['title2']}</p>
									<p class="coupon-time">
										{if $coupon['timestr']==''}
											永久有效
										{else}
											{if $coupon['past'] }
												已过期
											{else}
												有效期 {$coupon['timestr']}
											{/if}
										{/if}
										{if $coupon['merchname']!='' }
										限购[{$coupon['merchname']}]店铺商品
										{/if}
									</p>
								</div>
							</div>
						</div>
						<div class="fui-list-media coupon-index-list-right">
							<div class="forth0 circle coupon-list-canvas"></div>
							<i class="coupon-list-ling">
								{if $coupon['check'] ==2}
								已过期
								{else if $coupon['check'] ==1}
								已使用
								{else}
								立即使用
								{/if}
							</i>
						</div>
					</div>
				</a>

			{/loop}
		</div>

		<a href="{if empty($data['merchid'])}{php echo mobileUrl()}{else}{php echo mobileUrl('merch')}{/if}">
			<div class="btn btn-danger block" style="margin: 0 0.5rem 0.5rem">返回商城查看更多商品</div>
		</a>
		{template '_copyright'}
	</div>
</div>
{template '_footer'}